<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    //获取
    window.alert("hello BOM");
    //方法
    //confirm 对话框
    var flag = confirm("你确定删除嘛?")
    alert(flag);
    //定时器-setInterval-周期性的执行某个函数
    var i = 0;
    setInterval(function(){
        i++;
        console.log("定时器执行了"+ i + "次");
        
    },2000);
    //定时器-setTimeout-延迟指定时间执行一次
    setTimeout(function(){
        alert("JS");
        
    },3000);
    //location
    alert(location.href);
    location.href = "https://www.bilibili.com/"


</script>


</body>
</html>